package com.project.mapper;

import com.project.bean.CutPageBean;
import com.project.bean.MessageBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IMessageMapper {
    public void add(MessageBean message);
    public void del(int id);
    public void update(@Param("sid") int id, @Param("newTel") String tel, @Param("newPost") String post);
    public List<MessageBean> findAll();
    public MessageBean findById(int id);
    public List<MessageBean> findByName(@Param("name") String name);
    public List<MessageBean> findByBirth(@Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);
    public void addMore(@Param("slist") List<MessageBean> list);
    public List<MessageBean> findByItem(@Param("name") String name,
                                       @Param("post") String post,
                                       @Param("start") LocalDate startDate,
                                       @Param("end") LocalDate endDate);
    public List<MessageBean> cutAllList(@Param("start") int start,@Param("pageSize") int pageSize);
    public int cutAllCount();
    public List<MessageBean> cutByList(@Param("start") int start,@Param("pageSize") int pageSize,
                                             @Param("name") String name,
                                             @Param("post") String post,
                                             @Param("startD") LocalDate startDate,
                                             @Param("endD") LocalDate endDate);
    public int cutByItem(@Param("name") String name,
                         @Param("post") String post,
                         @Param("start") LocalDate startDate,
                         @Param("end") LocalDate endDate);
}
